Skip to content

fix: accept result_mode as compatibility extra field - #235

Merged
EricNGOntos merged 1 commit into
Ontos-AI:mainfrom
gdccyuen:fix/gdccyuen/accept-result-mode-compat
Aug 3, 2026
Merged

fix: accept result_mode as compatibility extra field#235
EricNGOntos merged 1 commit into
Ontos-AI:mainfrom
gdccyuen:fix/gdccyuen/accept-result-mode-compat

Conversation

@gdccyuen

Copy link
Copy Markdown
Contributor

What

The dashboard's upload flow (file-upload-flow.tsx) sends result_mode in the job creation payload, but the API removed this field. The request is rejected with 400 Unsupported job-create fields.

Fix

Add result_mode to _PUBLIC_COMPATIBILITY_EXTRA_FIELDS in apps/api/app/services/document_ingestion/service.py so it's silently ignored instead of rejecting the whole request.

Context

  • result_mode was removed from JobMetadata (comment: "result_mode was removed and is no longer supported")
  • The dashboard's JobCreate type still includes result_mode: "auto" | "inline" | "url" (server/external-api/jobs.ts)
  • This causes every dashboard upload to fail with 400 Bad Request against the current API

Verification

Tested end-to-end with a local Docker Compose deployment — uploads succeed after this fix.

Dashboard still sends result_mode in job creation requests but the
API removed it. Add to _PUBLIC_COMPATIBILITY_EXTRA_FIELDS so it's
silently ignored instead of rejecting the whole request with 400.

@EricNGOntos EricNGOntos left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — result_mode was removed from JobMetadata; silently ignoring it as a compatibility extra field unblocks dashboard uploads without changing behavior.

@EricNGOntos
EricNGOntos merged commit 8d2bb0d into Ontos-AI:main Aug 3, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants